<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>账号管理</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css"/>
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/customerManager/user/myCustomerPool.css"/>
    <style>
        .min-search{
            padding-right: 10px;
            width: 200px;
        }
    </style>
</head>
<body>
<div class="container-fluid customer-page">
    <div class="card">
        <div class="card-header">
            <h1>账号管理</h1>
        </div>
        <div class="card-body">
            <div class="row content-action">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                    <div class="row">
                        <div class="col-xs-12">
                            <div >
                                <label class="lyear-radio radio-inline radio-primary m-t-10">
                                    <input type="radio" name="accountStatus" checked="checked" value="2" onclick="selectStatus()">
                                    <span>显示全部</span>
                                </label>
                                <label class="lyear-radio radio-inline radio-primary m-t-10">
                                    <input type="radio" value="1" name="accountStatus" onclick="selectStatus()">
                                    <span>只显示禁用</span>
                                </label>
                                <label class="lyear-radio radio-inline radio-primary m-t-10">
                                    <input type="radio" value="0" name="accountStatus" onclick="selectStatus()">
                                    <span>只显示可用</span>
                                </label>
                                <label class="lyear-radio radio-inline radio-primary m-t-10">
                                    <input type="radio" value="3" name="accountStatus" onclick="selectStatus()">
                                    <span>只显示停用</span>
                                </label>
                                <label class="lyear-radio radio-inline radio-primary m-t-10">
                                    <input type="radio" value="4" name="accountStatus" onclick="selectStatus()">
                                    <span>只显示离职</span>
                                </label>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left: 0;margin-bottom: 15px">
                    <div class="min-search pull-left">
                        <input class="form-control" type="text" placeholder="请输入用户名"
                               id="userName" name="userName" autocomplete="off"
                               onkeyup="this.value=this.value.replace(/^\s+|%|\s+$/g, '')">
                    </div>
                    <div class="min-search pull-left">
                        <input class="form-control pull-left" type="text" placeholder="请输入分公司名称"
                               id="companyName" name="companyName" autocomplete="off"
                               onkeyup="this.value=this.value.replace(/^\s+|%|\s+$/g, '')">
                    </div>
                    <div class="min-search pull-left">
                        <input class="form-control pull-left" type="text" placeholder="请输入账号"
                               id="searchUserAccount" name="companyName" autocomplete="off"
                               onkeyup="this.value=this.value.replace(/^\s+|%|\s+$/g, '')">
                    </div>
                    <div class="min-search pull-left">
                        <input class="form-control pull-left" type="text" placeholder="请输入分机号"
                               id="extensionNumber" name="companyName" autocomplete="off"
                               onkeyup="this.value=this.value.replace(/^\s+|%|\s+$/g, '')">
                    </div>
                    <button class="btn btn-primary" type="button" onclick="searchUserAccountList()" ><i class="mdi mdi-magnify"></i><span>搜索</span></button>
                    <div class="btn btn-primary" onclick="addUserAccount()" style="padding: 8px 20px;">新增
                    </div>
                </div>



            <table id="userAccountTable"></table>
        </div>

        <!--绑定电话弹出框-->
        <div class="modal fade" tabindex="-1" role="dialog" id="addCallModal">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-body">
                        <input type="hidden" id="accountId" name="accountId">

                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                            <div class="row">
                                <div class="col-xs-12">
                                    <div >
                                        <label class="lyear-radio radio-inline radio-primary m-t-10">
                                            <input type="radio" name="callType" checked="checked" value="2" onclick="selectType()">
                                            <span>全国号码</span>
                                        </label>
                                        <label class="lyear-radio radio-inline radio-primary m-t-10">
                                            <input type="radio" value="1" name="callType" onclick="selectType()">
                                            <span>本地号码</span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                            <div>
                                <label for="callSelect">选择号码*:</label>
                                <select id="callSelect" name="callSelect" class="form-control" title="请选择号码" data-live-search="true">
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer" style="display: flex;justify-content: center;">&nbsp;&nbsp;&nbsp;
                        <button style="margin-right: 20px;" type="button" class="btn btn-primary" onclick="savebindCall()">保存</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <!--end-->

        <!--阶段性停用弹出框-->
        <div class="modal fade" tabindex="-1" role="dialog" id="deacDiv">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-body">
                        <input type="hidden" id="accountIdForDeac" name="accountIdForDeac">

                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                            <div>
                                <label for="deacTypeSelect">停用类型:</label>
                                <select id="deacTypeSelect" class="form-control" type="text">
                                    <option>请选择</option>
                                    <option value="1">产假</option>
                                    <option value="2">出差</option>
                                    <option value="3">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-lg-3 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label" for="deacToTime">停用至：</label>
                            <div class="form-content input-group">
                                <input type="text" id="deacToTime" class="form-control date-input"
                                       placeholder="请输入日期" autocomplete="off">
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer" style="display: flex;justify-content: center;">&nbsp;&nbsp;&nbsp;
                        <button style="margin-right: 20px;" type="button" class="btn btn-primary" onclick="saveDeac()">保存</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <!--end-->
    </div>
</div>

<!-- 添加div -->
<div class="modal fade" tabindex="-1" role="dialog" id="addUserAccount" >
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form>
                <div class="modal-body">
<!--                    <input type="hidden" id="taskId" name="taskId">-->
                    <div class="row">
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label label-required" for="userNameAdd">用户名</label>
                            <div class="form-content">
                                <input type="text" class="form-control" id="userNameAdd" placeholder="请输入用户名">
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label label-required" for="userAccount">账号名</label>
                            <div class="form-content">
                                <input type="text" class="form-control" id="userAccount" placeholder="请输入账号名">
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label label-required" for="email">邮箱</label>
                            <div class="form-content">
                                <input type="text" class="form-control" id="email" placeholder="请输入邮箱">
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="control-label label-required" for="phone">电话</label>
                            <div class="form-content">
                                <input type="text" class="form-control" id="phone" placeholder="请输入电话">
                            </div>
                        </div>
                        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12" id="companyDiv">
                            <label class="control-label label-required" for="companySelect">公司</label>
                            <div class="form-content">
                                <select id="companySelect" name="companySelect" class="form-control" type="text" title="请选择"></select>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="modal-footer" style="display: flex;justify-content: center;">&nbsp;&nbsp;&nbsp;
                    <button style="margin-right: 20px;" type="button" class="btn btn-primary" onclick="saveUserAccount()">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- end -->
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!--行内编辑插件-->
<link href="/js/x-editable/1.5.1/bootstrap3-editable/css/bootstrap-editable.min.css" rel="stylesheet">
<script type="text/javascript" src="/js/x-editable/1.5.1/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<!-- 图表 -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/user/userAccount.js"></script>
</html>